<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../utils/flexible.js"></script>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    ul,
    li {
      list-style: none;
    }

    a {
      text-decoration: none;
    }

    img {
      display: block;
    }

    body {
      width: 10rem;
    }

    .header {
      width: 10rem;
      display: flex;
      justify-content: space-around;
      align-items: center;
      height: 1.87rem;
      background: #ff841d;
    }

    .header a {
      font-size: 0.53rem;
      color: #fff;
    }

    .header p {
      font: 0.6rem/1rem "";
      color: #fff;
    }

    .header span img {
      width: 1.1rem;
      height: 1.1rem;
      padding-left: 0.27rem;
    }

    .container-1 {
      padding-top: 0.5rem;
    }

    .container-1 span {
      font: 0.37rem/0.48rem "";
    }

    #footer button {
      height: 0.85rem;
      width: 9.47rem;
      margin-left: 0.2rem;
      margin-top: 0.3rem;
    }

    #footer .brand {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 0.91rem;
      background: #ff9000;
      text-align: center;
      margin-top: 0.13rem;
    }

    #footer .brand span {
      background: #ff9000;
      color: #fff;
      margin-left: 0.6rem;
      font-size: 0.6rem;
    }

    #footer .brand a img {
      height: 0.5rem;
      width: 0.5rem;
      margin-right: 0.2rem;
    }

    #login {
      text-align: center;
      display: flex;
      flex-direction: column;
      background: #f4f4f4;
    }

    #login .container {
      display: flex;
      justify-content: space-between;
      margin-top: 0.13rem;
    }

    #login .container a {
      width: 33%;
      color: #666;
      border: 0.03rem solid #ccc;
      text-align: center;
      font-size: 0.4rem;
    }

    #login p {
      margin-top: 0.27rem;
    }

    #login span {
      margin-top: 0.17rem;
    }
  </style>
</head>

<body>
  <header class="header">
    <a href="../pages/moneyctrl.html">&lt;</a>
    <p>省钱控-最新优惠</p>
    <span><img src="../assets/images/header_app.png" alt=""></span>
  </header>
  <div class="container-1">

  </div>
  <section id="footer">
    <button>更多优惠信息&gt;&gt;</button>
    <div class="brand">
      <span>品牌排行</span>
      <a href="#"><img src="../assets/images/more.png" alt=""></a>
    </div>
  </section>
  <div id="login">
    <div class="container">
      <a href="#">登入</a>
      <a href="#">注册</a>
      <a href="#" class="gotop">返回顶部</a>
    </div>
    <p>手机APP下载 慢点买手机版--掌上比价平台</p>
    <span>m.mandianmai.com</span>
  </div>
</body>

</html>
<script src="../utils/qr.js"></script>
<script>
  // console.log(location.href);
  (function () {
    let container = document.querySelector(".container-1")
    let url = location.href;

    let {
      productid
    } = getUrlParams(url);
    // console.log(productid);

    fetch(`http://chst.vip:1234/api/getmoneyctrlproduct?productid=${productid}`)
      .then(body => body.json())
      .then(res => {
        console.log(res);
        let result = res.result[0]
        let html2 = `
                        <h3>${result.productName}</h3>
                        <p>${result.productFrom}|${result.productTime}|${result.productTips}</p>
                        <b>${result.productImg2}</b>
                        <span>${result.productInfo}${result.productInfo1}</span>
                        <ul>${result.productCity}</ul>
                        <h4>${result.productComment}</h4>
                    `
        container.innerHTML = html2;
      })

  })()
</script>